1. Field of the Invention
The present invention relates to a technique of resizing (resolution-converting) captured image data.
2. Description of the Related Art
As is well-known conventionally, a digital camera generates two kinds of files. One is the JPEG or TIFF file format used for an image that has undergone image processing in the digital camera. A general-purpose image viewer can open this image file. The other is a file format called RAW that records the output of a two-dimensional array sensor upon image capturing without executing any image processing related to image capturing conditions. As a characteristic feature, the RAW format can redevelop an image by changing various parameters at the time of image capturing because an application outside the camera executes image processing related to the image capturing conditions (e.g., Japanese Patent Laid-Open No. 2004-128809).
However, a RAW image file is losslessly compressed data and generally has a size larger than a JPEG or TIFF file. The RAW format is effective when JPEG compression is undesirable, or when the light source state is difficult to estimate and should be adjusted later.
Some conventional digital cameras generate both RAW image data and JPEG image data by one image capturing. FIG. 8 shows a block arrangement for generating RAW image data and JPEG image data.
A white balance circuit 7b1 adjusts the white balance of digital image data output from an image sensor and A/D-converted by multiplying the image data by a white balance coefficient. The image data with the adjusted white balance undergoes color interpolation by a color interpolation circuit 7b2 to generate three R, G, and B planes from the data of a pattern (e.g., Bayer matrix) with a matrix of R (red), G (green), and B (blue). A masking processing circuit 7b3 optimizes the colors of the image data containing the three R, G, and B planes by, e.g., a 3×3 matrix operation. A γ-conversion circuit 7b4 executes γ-conversion of the image data. A YUV conversion circuit 7b5 converts the γ-converted image data from R, G, and B signals to a luminance component Y and color difference components U/V for false color processing and edge enhancement.
To create a normal JPEG image, the Y signal, i.e., the luminance component of the YUV-converted signals undergoes edge enhancement by an edge enhancement circuit 7b9. The U/V signals, i.e., the color difference components of the YUV-converted signals pass through the median filter of a median filter circuit 7b8. A JPEG compression circuit 7e JPEG-compresses the resultant YUV data.
The digital image data also directly enters a lossless compression circuit 7d without passing through the white balance circuit and the like. The image processing circuit 7b creates RAW image data.
However, the RAW file always has a data size corresponding to the number of pixels of the sensor, as shown in FIG. 4. It is therefore not easy to reduce the file size in accordance with the application purpose of the image. If the number of pixels of a digital camera increases, the size of the RAW file also increases. However, most two-dimensional array sensors have a staggered RGB pattern called a Bayer matrix. Hence, it is impossible to simply reduce the number of pixels, unlike the data of three R, G, and B planes. If image data of the Bayer matrix is simply resized and returned to the original pattern, moiré and false colors after development increase as compared to the image data before resizing, resulting in degradation in image quality.